package ch6;

import java.util.Scanner;

public class FillArray {

	public static void main(String[] args) {
		int[] ar = new int[10];
		System.out.println(ar);
		Scanner in = new Scanner(System.in);
		System.out.println("请输入10个数：");
		for (int i = 0; i < ar.length; i++) {
			ar[i] = in.nextInt();
		}
		// System.out.println(ar);
		int sum = 0;
		for (int i = 0; i < ar.length; i++) {
			System.out.print(ar[i] + "\t");
			sum += ar[i];
		}
		System.out.println();
		int avg = sum / ar.length;
		System.out.println("平均分是：" + avg);
	}
	// 定义一个数组，把里面的每个数*5，再输出
}
